home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 32
/
Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso
/
Aminet
/
comm
/
mail
/
PegMail.lha
/
PegMail
/
source
/
pegmail_gui.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-03-28
|
4KB
|
182 lines
#ifndef MAKE_ID
#define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
#endif
#ifdef _DCC
#define __inline
#endif
#include "pegmail_gui.h"
struct ObjApp * CreateApp(void)
{
struct ObjApp * Object;
APTR GROUP_ROOT_0, GR_grp_0, GR_grp_1, LA_label_1, GR_grp_1CC, LA_label_4;
APTR GR_grp_2, LA_label_3, REC_label_0, REC_label_2, GR_grp_3;
if (!(Object = AllocVec(sizeof(struct ObjApp), MEMF_PUBLIC|MEMF_CLEAR)))
return(NULL);
Object->STR_TX_label_0 = "Idle...";
LA_label_1 = Label("Source");
Object->STR_PA_label_0 = String("", 80);
Object->PA_label_0 = PopButton(MUII_PopFile);
Object->PA_label_0 = PopaslObject,
MUIA_HelpNode, "PA_label_0",
MUIA_Popasl_Type, 0,
MUIA_Popstring_String, Object->STR_PA_label_0,
MUIA_Popstring_Button, Object->PA_label_0,
//ASLFR_Locale, TRUE,
ASLFR_TitleText, "Please select source file(s)",
ASLFR_DoMultiSelect, TRUE,
MUIA_Popasl_StopHook, &aslob_hook,
End;
GR_grp_1 = GroupObject,
MUIA_HelpNode, "GR_grp_1",
MUIA_Group_Horiz, TRUE,
Child, LA_label_1,
Child, Object->PA_label_0,
End;
LA_label_4 = Label("Destination");
Object->STR_PA_label_1 = String("", 80);
Object->PA_label_1 = PopButton(MUII_PopFile);
Object->PA_label_1 = PopaslObject,
MUIA_HelpNode, "PA_label_1",
MUIA_Popasl_Type, 0,
MUIA_Popstring_String, Object->STR_PA_label_1,
MUIA_Popstring_Button, Object->PA_label_1,
End;
GR_grp_1CC = GroupObject,
MUIA_HelpNode, "GR_grp_1CC",
MUIA_Group_Horiz, TRUE,
MUIA_ShowMe, FALSE,
Child, LA_label_4,
Child, Object->PA_label_1,
End;
LA_label_3 = Label("Status");
Object->TX_label_0 = TextObject,
MUIA_Background, MUII_TextBack,
MUIA_Frame, MUIV_Frame_Text,
MUIA_Text_Contents, Object->STR_TX_label_0,
End;
GR_grp_2 = GroupObject,
MUIA_HelpNode, "GR_grp_2",
MUIA_Group_Horiz, TRUE,
Child, LA_label_3,
Child, Object->TX_label_0,
End;
REC_label_0 = RectangleObject,
MUIA_Rectangle_HBar, TRUE,
MUIA_FixHeight, 8,
End;
Object->GA_label_1 = GaugeObject,
GaugeFrame,
MUIA_HelpNode, "GA_label_1",
MUIA_FixHeight, 10,
MUIA_Gauge_Horiz, TRUE,
MUIA_Gauge_Max, 100,
End;
REC_label_2 = RectangleObject,
MUIA_Rectangle_HBar, TRUE,
MUIA_FixHeight, 8,
End;
Object->BT_quit = SimpleButton("Quit");
Object->BT_conv = SimpleButton("Convert");
GR_grp_3 = GroupObject,
MUIA_HelpNode, "GR_grp_3",
MUIA_Group_Horiz, TRUE,
Child, Object->BT_quit,
Child, Object->BT_conv,
End;
GR_grp_0 = GroupObject,
MUIA_HelpNode, "GR_grp_0",
Child, GR_grp_1,
Child, GR_grp_1CC,
Child, GR_grp_2,
Child, REC_label_0,
Child, Object->GA_label_1,
Child, REC_label_2,
Child, GR_grp_3,
End;
GROUP_ROOT_0 = GroupObject,
Child, GR_grp_0,
End;
Object->WI_label_0 = WindowObject,
MUIA_Window_Title, "PegMail 1.0 by Krzynio@fan.com",
MUIA_Window_ID, MAKE_ID('0', 'W', 'I', 'N'),
MUIA_Window_AppWindow, TRUE,
WindowContents, GROUP_ROOT_0,
End;
Object->App = ApplicationObject,
MUIA_Application_Author, "Krzynio Koziarek",
MUIA_Application_Base, "NONE",
MUIA_Application_Title, "Pegmail",
MUIA_Application_Version, "$VER: Pegmail 1.0 (26.03.99)",
MUIA_Application_Copyright, "Krzynio Koziarek",
MUIA_Application_Description, "Pegasus -> Yam Converter",
SubWindow, Object->WI_label_0,
End;
if (!Object->App)
{
FreeVec(Object);
return(NULL);
}
DoMethod(Object->WI_label_0,
MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
Object->App,
2,
MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit
);
DoMethod(Object->WI_label_0,
MUIM_Window_SetCycleChain, Object->PA_label_0,
Object->PA_label_1,
Object->BT_quit,
Object->BT_conv,
0
);
set(Object->WI_label_0,
MUIA_Window_Open, TRUE
);
return(Object);
}
void DisposeApp(struct ObjApp * Object)
{
MUI_DisposeObject(Object->App);
FreeVec(Object);
}